<%-- 
    Document   : Nouvo
    Created on : 7 mai 2011, 15:02:38
    Author     : Mariam Soumaré
--%>

<%@page import="javax.naming.InitialContext"%>
<%@page import="javax.ejb.EJB"%>
<%@page import="ecom.beans.session.EcomAdminRemote"%>
<%@page import="ecom.beans.entity.Accounts"%>
<%@page import="java.util.List"%>
<%@page  import="javax.naming.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">



<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>appel de l'ejb</h1>
        <%
           
      InitialContext ic = new InitialContext( ) ;
      EcomAdminRemote admin = ( EcomAdminRemote ) ic.lookup( EcomAdminRemote.class.getName() ) ;
            
            
            List<Accounts> counts = null;
            counts  = admin.getAllAccount();

          System.out.println ("liste \n");
          for(int i =0;  i<counts.size ();  i++){
          System.out.println("balance : "+counts.get(i).getBalance() +" owner : "+counts.get(i).getOwner()+ "idclient : "+counts.get(i).getClients().getPrenom());
       

   

%>

balance : <%=counts.get(i).getBalance()%><br>
 owner :  <%=counts.get(i).getOwner()%><br>
 Nom client : <%=counts.get(i).getClients().getPrenom()%>


<%
 }
%>
    </body>
</html>
